package sniff.pack;

public class MyUDPPacket extends CommonIPChildPacket{
	protected int sourctPort;
	protected int destinationPort;
	protected int udpLen;
	protected String checkNum;
	
	public MyUDPPacket() {
		
	}
	
	public MyUDPPacket(int sourctPort, int destinationPort, int udpLen, String checkNum) {
		this.sourctPort = sourctPort;
		this.destinationPort = destinationPort;
		this.udpLen = udpLen;
		this.checkNum = checkNum;
	}

	public int getSourctPort() {
		return sourctPort;
	}

	public void setSourctPort(int sourctPort) {
		this.sourctPort = sourctPort;
	}

	public int getDestinationPort() {
		return destinationPort;
	}

	public void setDestinationPort(int destinationPort) {
		this.destinationPort = destinationPort;
	}

	public int getUdpLen() {
		return udpLen;
	}

	public void setUdpLen(int udpLen) {
		this.udpLen = udpLen;
	}

	public String getCheckNum() {
		return checkNum;
	}

	public void setCheckNum(String checkNum) {
		this.checkNum = checkNum;
	}
	@Override
	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("Source Port:"+this.sourctPort+"\n");
		sb.append("Destination Port:"+this.destinationPort+"\n");
		sb.append("Length:"+this.udpLen+"\n");
		sb.append("Check Sum:"+this.checkNum+"\n");
		return sb.toString();
	}
}
